package com.zenithsun.common.basicdata.service;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import com.syzg.common.service.BaseService;
import com.zenithsun.common.basicdata.model.Basicdata;
import com.zenithsun.common.bean.DownLoadVersion;
import com.zenithsun.common.bean.OutMessage;
import com.zenithsun.common.bean.TreeItem;

public interface BasicdataService extends BaseService<Basicdata> {

	/**
	 * @author wanglei@enersun.com.cn
	 * 获取树形结构的基础数据信息
	 * @param parentCode
	 * @return List<TreeItem>
	 * @throws Exception
	 */
	public List<TreeItem> getTreeNewsBasicData(String parentCode) throws Exception;

	/**
	 * 根据版本类型获取版本信息
	 * @param appType
	 * @return DownLoadVersion
	 * @throws Exception
	 */
	public DownLoadVersion getDownLoadVersion(String appType) throws Exception;
	
	
	/**
	 * 根据父code获取基础数据信息
	 * @param parentCode
	 * @return List<Basicdata>
	 * @throws Exception
	 */
	public List<Basicdata> getBasicdataByParentCode(String parentCode) throws Exception;
	
	/**
	 * 修改App配置
	 * @param basicdata
	 * @return boolean
	 * @throws Exception
	 */
	public boolean updateApp(Basicdata basicdata) throws Exception;
	
	/**
	 * 上传App文件
	 * @param baId
	 * @param request
	 * @return OutMessage
	 * @throws Exception
	 */
	public OutMessage uploadAppFile(String baId, String version, HttpServletRequest request) throws Exception;
}
